// packageF/mycomponent/stats_card.js
Component({
  /**
   * 组件的属性列表
   */
  options: {
    addGlobalClass: true,
  },
  properties: {
    enterprise:{
      type:Object,
      value:{}
    },
    typeName:{
      type:String,
      value:''
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    time:'month'
  },

  /**
   * 组件的方法列表
   */
  methods: {
    monthNum(e) {
      console.log(e);
      console.log(this.data); 
      let timeCard = e.currentTarget.dataset.time;
      let typename = e.currentTarget.dataset.typename;
      console.log(typename);
      this.setData({
        time:timeCard
      });
      console.log(timeCard);
      let query = {
        timeCard,
        typename
      }
      this.triggerEvent('myevent',query);
    },
    onSecond(e) { //正常跳转三级页面传值
      let typename = e.currentTarget.dataset.typename;
      this.triggerEvent('navToSecond',typename);
    },
    ononSecondLevel(e) { //只需要跳转二级页面，不用传值
      this.triggerEvent('navToSecondLevel');
    }
  }
})
